package com.icinfo.cloud.provider.punish.api.vo;

import com.alibaba.fastjson.JSONObject;
import com.icinfo.cloud.provider.common.constant.Constant;
import lombok.Data;

import java.io.Serializable;

/**
 * 证据共享库回调案件信息
 * @author Administrator
 */
@Data
public class ShareEvidenceCaseVo implements Serializable {

    private Integer code;

    private JSONObject data;

    private String message;

    private Boolean success;

    private Integer totalCount;

    public static ShareEvidenceCaseVo success(JSONObject data){
        ShareEvidenceCaseVo vo = new ShareEvidenceCaseVo();
        vo.setSuccess(true);
        vo.setCode(200);
        vo.setMessage(Constant.STRING_SUCCESS_EN);
        vo.setData(data);
        vo.setTotalCount(1);
        return vo;
    }
    public static ShareEvidenceCaseVo fail(String message){
        ShareEvidenceCaseVo vo = new ShareEvidenceCaseVo();
        vo.setSuccess(false);
        vo.setCode(500);
        vo.setMessage(message);
        vo.setData(null);
        vo.setTotalCount(0);
        return vo;
    }

}
